package com.xjoyt.pay.merchant.register.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import com.xjoyt.pay.merchant.register.po.Merchant;
import com.xjoyt.pay.repository.Repository;

public interface MerchantRepository extends Repository<Merchant>{

	@Query(" select a from Merchant a where a.distributor.id = ?1 and a.outNo = ?2 ")
	Page<Merchant> findAllByDistributorIdAndNo(String distributorId, String outNo, Pageable pageable);

	Merchant findOneByIdAndOutNo(String id, String outNo);
}
